
<template>
  <div class="demo">
    <audio :src="audio" autoplay loop></audio>
    <message v-if="isShow"></message>
  </div>
</template>

<script>
import $ from "jquery";
import fireworks from "./js/firework.js";
import message from "../../components/modal";
import { POST } from "../../api/api.js";
export default {
  components: {
    message
  },
  data() {
    return {
      isShow: false,
      audio: require("../../img/boom.mp3")
    };
  },
  mounted() {
    document.title = "猪年到";
    let _this = this;
    $(".demo").fireworks({
      sound: true, // sound effect
      width: "100%",
      height: "100%"
    });
    const timer = setTimeout(() => {
      this.isShow = true;
    }, 40000);
  },
  methods: {},
  created() {}
};
</script>

<style lang='scss' scoped>
.demo {
  background: url(../../img/fire-bg.png) no-repeat !important;
  display: flex !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 100000;
}
</style>
